﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace ShopeeSdk.Response.Shopee.Logistics
{
    public class GetLogisticsResponse : ShopeeResponse
    {
        [JsonProperty("logistics")]
        public List<Logistic> Logistics { get; set; }

        public class Logistic
        {
            [JsonProperty("weight_limits")]
            public WeightLimits WeightLimits { get; set; }
            [JsonProperty("has_cod")]
            public bool HasCod { get; set; }
            [JsonProperty("item_max_dimension")]
            public ItemMaxDimension ItemMaxDimension { get; set; }
            [JsonProperty("sizes")]
            public List<Size> Sizes { get; set; }
            [JsonProperty("logistic_name")]
            public string LogisticName { get; set; }
            [JsonProperty("enabled")]
            public bool Enabled { get; set; }
            [JsonProperty("logistic_id")]
            public int LogisticId { get; set; }
            [JsonProperty("fee_type")]
            public string FeeType { get; set; }
        }

        public class WeightLimits
        {
            [JsonProperty("item_min_weight")]
            public float ItemMinWeight { get; set; }
            [JsonProperty("item_max_weight")]
            public float ItemMaxWeight { get; set; }
        }

        public class Size {
            [JsonProperty("size_id")]
            public int SizeId { get; set; }
            [JsonProperty("name")]
            public int Name { get; set; }
            [JsonProperty("default_price")]
            public int DefaultPrice { get; set; }
        }

        public class ItemMaxDimension
        {
            [JsonProperty("height")]
            public float Height { get; set; }
            [JsonProperty("width")]
            public float Width { get; set; }
            [JsonProperty("length")]
            public float Length { get; set; }
            [JsonProperty("unit")]
            public string Unit { get; set; }
        }
    }
}
